package com.lh.blogCommon.exception;

import com.lh.blogCommon.result.ResultCode;

//创建时间 2021/3/16
//创建人 lh
//描述 自定义异常处理
public class personalBlogEx extends RuntimeException {

    private Integer code;

    public personalBlogEx(String message, Integer code) {
        super(message);
        this.code = code;
    }

    public personalBlogEx(ResultCode resultCode) {
        super(resultCode.getMessage());
        this.code = resultCode.getCode();
    }

    @Override
    public String toString() {
        return "personalBlogEx{" +
                "code=" + code +",msg="+this.getMessage()+
                '}';
    }
}
